#include <REGX52.H>

sbit  LED = P2;

void Delay(unsigned int T)
{
	while(T--);
	
}
void main()
{
	unsigned char t,i;
	
	while(1)
	{
		for(t=0;t<100;t++)
		{
				for(i=0;i<20;i++)
			{
			  LED=0;
			  Delay(t);
			  LED=1;
			  Delay(100-t);
			}
			 
		}
       for(t=100;t>0;t--)
		{
			for(i=0;i<20;i++)
			{
			 LED=0;
		     Delay(t); 
		     LED=1;
		     Delay(100-t); 
		}			
			
			}
		
	}
}
